home *** CD-ROM | disk | FTP | other *** search
- A86 assembler package V3.09 August 13, 1987
- The entire package is Copyright (C)1986-1987 Eric Isaacson.
- All rights reserved.
-
- For easier bulletin-board distribution, I have split this package
- into three ARC files, A86V309A.ARC, A86V309B.ARC, and
- A86V309C.ARC. The first file contains enough to get you started;
- you can evaluate the package and then download the second and
- third files later on.
-
- PLEASE read Chapter 1 for legal terms and conditions, how to
- register for the package, and the overview of the assembler.
-
-
- QUESTION: "I bought this assembler from XYZ Software House, that
- advertised great software for $5 per disk. What's going on
- here? Have I already bought an assembler, or what?"
-
- ANSWER: Well, no, not exactly. You've bought a disk that has
- great software on it; you haven't bought the software yet.
- A86, like the vast majority of software offered by the $5-per-
- disk distribution houses, is free-distribution software (also
- known as "shareware", or "user-supported software"). That
- means I retain the right to A86, but I choose to let people
- pass it around. I have no business relationship with any
- distribution houses; I don't get a penny of the $5 (or
- whatever) you paid them for the disk containing A86. So I need
- and expect to be paid by you, because I'm trying to make a
- living out of making and supporting shareware products.
-
- Many distribution houses do a pretty poor job of revealing the
- shareware nature of the software they sell. If you thought you
- had purchased the software free and clear, you might feel
- justified in being angry with them for having misled you. And
- you might look around for houses that do a better job of
- informing the public. But I hope you'll take the time to
- consider everybody's role in the shareware marketing scene; if
- you do, I think you'll conclude that although you may have
- been misled, you haven't really been cheated out of anything.
-
- Shareware is great for authors like me, who have spent all
- their years in their computer holes, learning to be great
- programmers, and no time in business school learning marketing
- and distribution techniques. We simply cast our programs to
- the winds. They are distributed at practically no cost to
- us. That's why we can charge a lot less than the cost of
- "commercial" software.
-
- Shareware is also great for customers like you. You can try
- out the software before paying for it. You'll know that a
- successful shareware product is good, because only satisfied
- customers pay for it. The existence of shareware infuses
- healthy competition in the entire software market, for both
- price and quality. In the case of A86, I'm utterly convinced
- that you'll never find a better value for an assembler,
- anywhere.
- 0-2
-
- Finally, let's consider the distribution houses. They provide
- a legitimate service, for which they charge a reasonable price.
- The best houses act as librarians, evaluating and cataloguing
- software. Most pay thousands of dollars for advertising.
- Their cut is far less than the distributor's cut for
- "commercial" software (they prosper because their volume is
- bigger). Most customers for the distribution houses are repeat
- customers, who are aware of, and happy with, what they are
- getting. If it weren't for your XYZ House, you might never
- have heard of A86, or might never have figured out where to
- obtain it.
-
- So I hope you'll be happy with shareware, and actively desire
- to support it. You'll feel good about promoting a healthy
- situation for everybody. And you'll encourage the best
- programmers in the world to keep writing for you, instead of
- for the big corporations.
-
-
- Now that I've said that, let's move on to the package. The A86
- package consists of the four programs A86.COM, XREF.COM,
- EXMAC.COM, and FAKE.EXE; a collection of source, batch, and
- library files used by the demonstration contained in Chapter 2,
- and a sequence of DOC files that, when printed out in order, make
- the manual. Each chapter is a DOC file whose name starts with 2
- digits indicating the chapter number. The files are:
-
- 00README.DOC (this file) 09DIRC.DOC
- 01INTRO.DOC 10RELOC.DOC
- 02DEMO.DOC 11MACRO.DOC
- 03OPREQ.DOC 12COMPAT.DOC
- 04ELEM.DOC 13TOOLS.DOC
- 05EXCLUS.DOC 14HIST.DOC
- 06INSTR.DOC 15RESERV.DOC
- 07FLOAT.DOC 16INDEX.DOC
- 08EXPR.DOC
-
- 0-3
- TABLE OF CONTENTS
-
-
- CHAPTER 1 INTRODUCTION AND LEGAL TERMS
-
- Introduction 1-1
- Legal Terms and Conditions 1-1
- Overview of A86 1-3
- Who IS That Guy? 1-5
- Support Your Local Bulletin Board 1-5
- How to Get in Touch With Me 1-5
-
-
- CHAPTER 2 A86 DEMONSTRATION
-
- Demonstration of A86 and Associated Tools 2-1
- Assembling a Very Short Program: PAGE.COM 2-1
- Demonstration of Error-Reporting 2-1
- Assembling a Longer Program with Library Files: REV.COM 2-2
- Using XREF on a medium-sized program: TCOLS.COM 2-2
- Using EXMAC 2-3
-
-
- CHAPTER 3 OPERATION AND REQUIREMENTS
-
- A86 Program Invocation 3-1
- Assembler Switches 3-2
- The A86 Environment Variable 3-3
- Using Standard Input as a Command Tail 3-4
- Strategies for Source File Maintenance 3-4
- System Requirements for A86 3-5
-
-
- CHAPTER 4 ELEMENTS OF THE A86 LANGUAGE
-
- The A86 Language and the A86 Program 4-1
- General Categories of A86 Elements 4-1
- Operand Typing and Code Generation 4-3
- Registers 4-3
- Variables 4-3
- Labels 4-4
- Constants 4-4
- Generating Opcodes from General Purpose Mnemonics 4-4
-
-
- CHAPTER 5 SOME EXCLUSIVE FEATURES OF A86
-
- The IF Statement 5-1
- Multiple operands to PUSH, POP, INC, DEC 5-1
- Conditional Return Instructions 5-2
- A86 extensions to the MOV instruction 5-2
- Local Labels 5-2
- Operands to AAM and AAD Instructions 5-3
- 0-4
- CHAPTER 6 THE 86 INSTRUCTION SET
-
- Effective Addresses 6-1
- Segmentation and Effective Addresses 6-2
- Effective Use of Effective Addresses 6-3
- Encoding of Effective Addresses 6-4
- Table of Effective Address byte values 6-5
- How to Read the Instruction Set Chart 6-6
- The Instruction Set Chart 6-7
-
-
- CHAPTER 7 THE FLOATING-POINT PROCESSOR
-
- The 8087 and 287 Coprocessors 7-1
- Emulating the 8087 by Software 7-2
- The Floating Point Stack 7-3
- Floating Point Initializations 7-3
- Built-In Constant Names 7-3
- Special Immediate FLD Form 7-4
- Floating Point Operand Types 7-4
- Operand Choices in A86 7-5
- The 87 Instruction Set 7-5
-
-
- CHAPTER 8 NUMBERS AND EXPRESSIONS
-
- Numbers and Bases 8-1
- The RADIX Directive 8-2
- Special Defaults for DT Numbers 8-2
- Floating-point Initializations 8-3
- Overview of Expressions 8-3
- Types of Expression Operands 8-4
- Numbers and Label Addresses 8-4
- Variables 8-4
- Index Expressions 8-4
- Arithmetic Operators 8-4
- HIGH/LOW 8-4
- BY 8-5
- Addition (combination) 8-5
- Subtraction 8-6
- Multiplication and Division 8-6
- Shifting Operators 8-6
- Logical Operators 8-7
- Relational Operators 8-7
- Attribute Operators/Specifiers 8-8
- SHORT and LONG operators 8-8
- OFFSET operator 8-9
- NEAR Operator 8-9
- Square Brackets Operator 8-10
- Colon Operator 8-10
- ST Operator 8-11
- TYPE Operator 8-11
- THIS and $ Specifiers 8-11
- Operator Precedence 8-12
- 0-5
- CHAPTER 9 DIRECTIVES IN A86
-
- Segments in A86 9-1
- CODE ENDS and DATA ENDS Statements 9-2
- The ORG Directive 9-2
- The EVEN Directive 9-3
- Data Allocation Using DB, DW, DD, DQ, and DT 9-3
- The STRUC Directive 9-6
- Forward References 9-6
- Forward References in Expressions 9-7
- The EQU Directive 9-8
- Equates to Built-In Symbols 9-9
- The NIL Prefix 9-9
- Interrupt Equates 9-9
- Duplicate Definitions 9-10
- The PROC Directive 9-11
- The ENDP Directive 9-11
- The LABEL Directive 9-12
-
-
- CHAPTER 10 RELOCATION AND LINKAGE
-
- .OBJ Production Made Easy 10-1
- Overview of Relocation and Linkage 10-2
- The NAME Directive 10-5
- The PUBLIC Directive 10-5
- The EXTRN Directive 10-6
- MAIN: The Starting Location for a Program 10-7
- The END Directive 10-7
- The SEGMENT Directive 10-8
- DATA SEGMENT, STRUC and CODE SEGMENT Directives 10-11
- The ENDS Directive 10-11
- Default Outer SEGMENT 10-11
- The GROUP Directive 10-12
-
-
- CHAPTER 11 MACROS AND CONDITIONAL ASSEMBLY
-
- Macro Facility 11-1
- Simple Macro Syntax 11-1
- Formatting in macro definitions and calls 11-2
- Macro operand substitution 11-2
- Quoted-string operands 11-3
- Looping by operands in macros 11-4
- The #L last operator and indefinite repeats 11-5
- Character-loops 11-5
- The "B"-before and "A"-after operators 11-6
- Multiple-increments within loops 11-6
- Negative R-loops 11-7
- Nesting of loops in macros 11-7
- Implied closing of loops 11-8
- Local labels in macros 11-8
- Debugging macro expansions 11-9
- 0-6
- Conditional Assembly 11-10
- Conditional Assembly and Macros 11-11
- Conditional Assembly and the XREF Program 11-12
- Declaring Variables in the Assembler Invocation 11-13
- Null Invocation Variable Names 11-13
- Changing Values of Invocation Variables 11-14
-
-
- CHAPTER 12 COMPATIBILITY WITH OTHER ASSEMBLERS
-
- Conversion of Intel/IBM/MSDOS programs to A86 12-1
- Compatibility-symbols recognized by A86 12-3
- Conversion of A86 Programs to Intel/IBM/MSDOS 12-3
-
-
- CHAPTER 13 ASSOCIATED TOOLS
-
- XREF Cross-reference and Symbol Listing Facility 13-1
- EXMAC Macro Expansion Tool 13-3
- A86LIB Source File Library Tool 13-4
- Environment Variable A86LIB 13-4
- Forcing a Library Search 13-4
- Listings with A86 13-5
- Mimicking Tool: FAKE.EXE 13-6
-
-
- CHAPTER 14 RELEASE HISTORY OF A86
-
-
- CHAPTER 15 RESERVED SYMBOLS IN THE A86 LANGUAGE
-
-
- INDEX
-
-
-